/*闲置物品交易模块接口*/
import request from "@/utils/request";

//创建交易
export function addDeal(data){
    return request({
        url:'/Deal/addDeal',
        method:'post',
        data
    })
}

//获取我发起的交易 == 我要买的数据
export function getMyBuyDeal(data){
    return request({
        url:'/Deal/getMyBuyDeal',
        method:'post',
        data
    })
}

//    获取我收到的交易 == 要买我的闲置物品的
export function getMySaleDeal(data){
    return request({
        url:'/Deal/getMySaleDeal',
        method:'post',
        data
    })
}

//完成交易
export function finishDealByBuyer(data){
    return request({
        url:'/Deal/finishDealByBuyer',
        method:'post',
        data
    })
}

//取消交易
export function cancelDeal(data){
    return request({
        url:'/Deal/cancelDeal',
        method:'post',
        data
    })
}
